Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add basic deployment lock implementation #252

Merged
merged 25 commits into from
Feb 26, 2024
Merged

Conversation

shini4i
Copy link
Owner

@shini4i shini4i commented Feb 15, 2024

When merged, it will close #251

Screenshot 2024-02-15 at 19 03 31

Currently, the implementation is highly experimental and does not cover cases when the application was started after the start of the pre-defined window for deployment lock.

We can pass the schedule configuration from helm values like this: (the required changes are not yet merged)

lockdownSchedule:
  - cron: "* 2 * * *"
    duration: "3h45m"

Or just set it from the web interface. In case of keycloak integration being enabled, membership in a privileged group is required.

An alternative approach would be to create some custom way to pass the lockdown timeframe and validate each request against it. At the moment, it seems to be overengineering.

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

Attention: Patch coverage is 37.32394% with 89 lines in your changes are missing coverage. Please review.

Project coverage is 51.85%. Comparing base (78e6d1b) to head (4fc990d).

Files Patch % Lines
cmd/argo-watcher/server/router.go 33.66% 62 Missing and 5 partials ⚠️
cmd/argo-watcher/server/cron.go 38.46% 16 Missing ⚠️
cmd/argo-watcher/config/parsers.go 57.14% 2 Missing and 1 partial ⚠️
cmd/argo-watcher/server/server.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #252      +/-   ##
==========================================
- Coverage   53.42%   51.85%   -1.57%     
==========================================
  Files          20       22       +2     
  Lines        1402     1537     +135     
==========================================
+ Hits          749      797      +48     
- Misses        586      667      +81     
- Partials       67       73       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shini4i shini4i marked this pull request as ready for review February 24, 2024 17:43
cmd/argo-watcher/server/router.go Show resolved Hide resolved
web/src/Components/TasksTable.js Outdated Show resolved Hide resolved
web/src/config.js Outdated Show resolved Hide resolved
cmd/argo-watcher/server/router.go Show resolved Hide resolved
cmd/argo-watcher/server/router.go Show resolved Hide resolved
cmd/argo-watcher/server/cron.go Show resolved Hide resolved
docs/git-integration.md Outdated Show resolved Hide resolved
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@shini4i shini4i merged commit 7864961 into main Feb 26, 2024
2 of 4 checks passed
@shini4i shini4i deleted the feat/deploy-lock branch February 26, 2024 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for deployment lock
2 participants